//
//  IMSearchBar.m
//  wanzhaoIM
//
//  Created by wanzhao on 16/1/8.
//  Copyright © 2016年 liuyuantao. All rights reserved.
//

#import "IMSearchBar.h"

@implementation IMSearchBar

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        for (UIView *subView in self.subviews) {
            if ([subView isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) {
                [subView removeFromSuperview];
            }
            
//            if ([subView isKindOfClass:NSClassFromString(@"UISearchBarTextField")]) {
//                UITextField *textField = (UITextField *)subView;
//                [textField setBorderStyle:UITextBorderStyleNone];
//                textField.background = nil;
//                textField.frame = CGRectMake(8, 8, self.bounds.size.width - 2* 8,
//                                             self.bounds.size.height - 2* 8);
//                textField.layer.cornerRadius = 6;
//                
//                textField.clipsToBounds = YES;
//                textField.backgroundColor = [UIColor whiteColor];
//            }
        }
    }
    return self;
}

@end
